<div class="modal-header">
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
<h3>选择公众号已有素材</h3>
</div>
<div class="modal-body form-horizontal tab-content" style="padding-top:10px">
<ul class="nav nav-tabs">
	<li ng-if="!modaldata.onetype || modaldata.onetype=='image'" ng-class="{'active':modaldata.op=='image'}"><a href="javascript:;" ng-click="getmodal(modal,'image')">图片</a></li>
	<li ng-if="!modaldata.onetype || modaldata.onetype=='voice'" ng-class="{'active':modaldata.op=='voice'}"><a href="javascript:;" ng-click="getmodal(modal,'voice')">语音</a></li>
	<li ng-if="!modaldata.onetype || modaldata.onetype=='video'" ng-class="{'active':modaldata.op=='video'}"><a href="javascript:;" ng-click="getmodal(modal,'video')">视频</a></li>
	<li ng-if="!modaldata.onetype || modaldata.onetype=='news'" ng-class="{'active':modaldata.op=='news'}"><a href="javascript:;" ng-click="getmodal(modal,'news')">图文</a></li>
</ul>
<div class="keyword-list-head" style="margin-top:10px;margin-left:10px">
	<div class="clearfix jinyun-margin-bottom">
		<div class="form-inline  pull-left">
				<div class="input-group form-group" style="width: 400px;">
					<input type="text" name="keyword" ng-model="modaldata.params.title" class="form-control" placeholder="搜索关键字"/>
					<span class="input-group-btn"><button id="submit" ng-click="modaldata.params.page=1;getmodal(modal,modaldata.op,made_query(modaldata.params))" class="btn btn-default"><i class="fa fa-search"></i></button></span>
				</div>
		</div>
	</div>
</div>
<!--图文-->
<div class="img_pick_panel" ng-if="modaldata.op=='news'">
  <div class="inner_container_box side_r cell_layout">
    <div class="inner_main">
      <div class="bd" style="min-height:200px">
        <div class="media_list">
          <div class="group img_pick" id="js_imglist">
            <ul class="group">
              <li class="img_item js_imgitem" style="width: 152px;" ng-repeat="item in modaldata.list">
                <div class="img_item_bd" ng-click="pagedata.resultdata(item)">
                  <span class="js_img_icon pic cover" style="width: 150px;height:138px;background-image:url({{tomedia(item.attachment) || '../core/resource/images/nopic.jpg'}})"></span>
                  <span class="check_content">
                    <label class="frm_checkbox_label">
                      <span class="lbl_content">{{item.title}}</span>
					</label>
                  </span>
                </div>
              </li>
         
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!--图片-->
<div class="img_pick_panel" ng-if="modaldata.op=='image'">
  <div class="inner_container_box side_r cell_layout">
    <div class="inner_main">
      <div class="bd" style="min-height:200px">
        <div class="media_list">
          <div class="group img_pick" id="js_imglist">
            <ul class="group">
              <li class="img_item js_imgitem" style="width: 152px;" ng-repeat="item in modaldata.list">
                <div class="img_item_bd" ng-click="pagedata.resultdata(item)">
                  <span class="js_img_icon pic cover" style="width: 150px;height:138px;background-image:url({{tomedia(item.attachment) || '../core/resource/images/nopic.jpg'}})"></span>
                  <span class="check_content">
                    <label class="frm_checkbox_label">
                      <span class="lbl_content">{{item.title}}</span>
					</label>
                  </span>
                </div>

              </li>
         
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="media_list group voice_media" ng-if="modaldata.op=='voice'">
  <div class="msg_card audio_msg_card media_card mini no_opr_border" ng-repeat="voice in modaldata.list">
    <div class="msg_card_inner" >
      <div class="msg_card_bd">
        <div  class="audio_msg_wrp card file_wrp cover" ng-click="pagedata.resultdata(voice)">
          <div class="audio_msg">
            <div class="icon_audio_wrp l" data-attach="{{tomedia(voice.attachment)}}">
              <span class="icon_audio_msg"> <img src="/core/resource/images/ico-audio.png" width="60px"></img></span>
            </div>
            <div class="audio_content">
              <div class="audio_title">{{voice.title}}</div>
			</div>
          </div>
        </div>
      </div>
      <div class="msg_card_ft">
        <ul class="grid_line msg_card_opr_list">
          <li class="grid_item size-1of3 msg_card_opr_item">
            <a class="js_edit js_tooltip" id="{{voice.id}}" href="javascript:;" ng-click="play(voice.attachment,voice.id)" title="播放">
              <span class="msg_card_opr_item_inner">
                <i class="fa fa-play-circle-o ico-add"></i></span>
              <span class="vm_box"></span>
            </a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</div>

<div class="media_list group voice_media" ng-if="modaldata.op=='video'">
  <div class="msg_card audio_msg_card media_card mini no_opr_border" ng-repeat="item in modaldata.list">
    <div class="msg_card_inner">
      <div class="msg_card_bd" ng-click="pagedata.resultdata(item)">
        <div  class="audio_msg_wrp card file_wrp cover">
          <div class="audio_msg">
            <div class="icon_audio_wrp l" data-attach="{{tomedia(item.attachment)}}">
              <span class="icon_audio_msg"> <img src="/core/resource/images/ico-audio.png" width="60px"></img></span>
            </div>
            <div class="audio_content">
              <div class="audio_title">{{item.title}}</div>
			</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div ng-include="sys_html('common/modal_page',true)"></div>
</div>
<script>
scope.pagedata.resultdata=function(res){
	if(scope.modaldata.ismore){
		scope.modal_result(res);
	}else{
		scope.modal_result(res.media_id);
	}
}
</script>